<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateShopsDetailsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if(!Schema::HasTable('shops_details')){
            Schema::create('shops_details', function (Blueprint $table) {
                $table->increments('id');
                $table->string('nickname');
                $table->string('logo')->default('/uploads/shop/default.jpg')->comments('商店logo，默认为uploads/shop/default.jpg');
                $table->string('content')->default('我是新店');
                $table->string('site')->nullable();
                $table->string('cause')->comments('关店原因');
                $table->timestamps();
            });
        }
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        // Schema::drop('shops_details');
    }
}
